package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.system.domain.vo.FileUploadVO;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 境外宣传营销补贴申请，存储补贴申请信息对象 subsidy_application
 *
 * @author ruoyi
 * @date 2025-04-22
 */
@TableName("subsidy_application")
@Data
public class SubsidyApplication {
    private static final long serialVersionUID = 1L;

    /**
     * 记录ID，唯一标识，自增生成
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 业务ID
     */
    @Excel(name = "业务ID")
    @TableField(value = "business_id")
    private String businessId;

    /**
     * 申报单位，如企业或组织名称
     */
    @Excel(name = "申报单位，如企业或组织名称")
    @TableField(value = "reporting_unit")
    private String reportingUnit;

    /**
     * 活动名称
     */
    @Excel(name = "活动名称")
    @TableField(value = "activity_name")
    private String activityName;

    /**
     * 活动时间，格式 yyyy-MM-dd
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "活动时间，格式 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "activity_time")
    private Date activityTime;

    /**
     * 活动地点
     */
    @Excel(name = "活动地点")
    @TableField(value = "activity_address")
    private String activityAddress;


    /**
     * 经费预估，单位：元
     */
    @Excel(name = "经费预估公司")
    @TableField(value = "activity_unit")
    private BigDecimal activityUnit;

    /**
     * 经费预估，单位：元
     */
    @Excel(name = "经费预估，单位：元")
    @TableField(value = "activity_money")
    private BigDecimal activityMoney;

    /**
     * 类型: 1境外宣传营销补贴,2独立购买展位补贴
     */
    @Excel(name = "类型: 1境外宣传营销补贴,2独立购买展位补贴")
    @TableField(value = "type")
    private Integer type;

    /**
     * 填报日期，格式 yyyy-MM-dd
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "填报日期，格式 yyyy-MM-dd", width = 30, dateFormat = "yyyy-MM-dd")
    @TableField(value = "report_date")
    private Date reportDate;

    /**
     * 记录创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 记录更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "记录更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(exist = false)
    private List<FileUploadVO> files;

    @TableField(value = "create_by")
    private String createBy;


    @TableField(exist = false)
    private List<Examine>examines;

    /*
            事件类型 0 事前 1 事后
         */
    @TableField(value = "event_type")
    private Integer eventType;

    @TableField(value ="status")
    private Integer status;

    @TableField(exist = false)
    private String remark;



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("businessId", getBusinessId())
                .append("reportingUnit", getReportingUnit())
                .append("activityName", getActivityName())
                .append("activityTime", getActivityTime())
                .append("activityAddress", getActivityAddress())
                .append("activityMoney", getActivityMoney())
                .append("type", getType())
                .append("reportDate", getReportDate())
                .append("createdAt", getCreatedAt())
                .append("updatedAt", getUpdatedAt())
                .toString();
    }
}
